<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Class: Spec::Runner::Reporter</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Class</strong></td>
          <td class="class-name-in-header">Spec::Runner::Reporter</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../../../files/vendor/plugins/rspec/lib/spec/runner/reporter_rb.html">
                vendor/plugins/rspec/lib/spec/runner/reporter.rb
                </a>
        <br />
            </td>
        </tr>

        <tr class="top-aligned-row">
            <td><strong>Parent:</strong></td>
            <td>
                <a href="../../Object.html">
                Object
               </a>
            </td>
        </tr>
        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">



   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M000562">add_example_group</a>&nbsp;&nbsp;
      <a href="#M000569">dump</a>&nbsp;&nbsp;
      <a href="#M000568">end</a>&nbsp;&nbsp;
      <a href="#M000566">example_failed</a>&nbsp;&nbsp;
      <a href="#M000564">example_finished</a>&nbsp;&nbsp;
      <a href="#M000563">example_started</a>&nbsp;&nbsp;
      <a href="#M000565">failure</a>&nbsp;&nbsp;
      <a href="#M000561">new</a>&nbsp;&nbsp;
      <a href="#M000567">start</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->

    <div id="section">

    <div id="class-list">
      <h3 class="section-bar">Classes and Modules</h3>

      Class <a href="Reporter/Failure.html" class="link">Spec::Runner::Reporter::Failure</a><br />

    </div>

    <div id="constants-list">
      <h3 class="section-bar">Constants</h3>

      <div class="name-list">
        <table summary="Constants">
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">EXAMPLE_PENDING_DEPRECATION_WARNING</td>
          <td>=</td>
          <td class="context-item-value">&lt;&lt;-WARNING         DEPRECATION NOTICE: RSpec's formatters have changed example_pending         to accept three arguments instead of just two. Please see the rdoc         for Spec::Runner::Formatter::BaseFormatter#example_pending         for more information.                    Please update any custom formatters to accept the third argument         to example_pending. Support for example_pending with two arguments         and this warning message will be removed after the RSpec 1.1.5 release.       WARNING</td>
        </tr>
        </table>
      </div>
    </div>



    <div id="attribute-list">
      <h3 class="section-bar">Attributes</h3>

      <div class="name-list">
        <table>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">example_groups</td>
          <td class="context-item-value">&nbsp;[R]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">options</td>
          <td class="context-item-value">&nbsp;[R]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        </table>
      </div>
    </div>
      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Class methods</h3>

      <div id="method-M000561" class="method-detail">
        <a name="M000561"></a>

        <div class="method-heading">
          <a href="#M000561" class="method-signature">
          <span class="method-name">new</span><span class="method-args">(options)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000561-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000561-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/reporter.rb, line 6</span>
 6:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">options</span>)
 7:         <span class="ruby-ivar">@options</span> = <span class="ruby-identifier">options</span>
 8:         <span class="ruby-ivar">@options</span>.<span class="ruby-identifier">reporter</span> = <span class="ruby-keyword kw">self</span>
 9:         <span class="ruby-identifier">clear</span>
10:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <h3 class="section-bar">Public Instance methods</h3>

      <div id="method-M000562" class="method-detail">
        <a name="M000562"></a>

        <div class="method-heading">
          <a href="#M000562" class="method-signature">
          <span class="method-name">add_example_group</span><span class="method-args">(example_group)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000562-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000562-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/reporter.rb, line 12</span>
12:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_example_group</span>(<span class="ruby-identifier">example_group</span>)
13:         <span class="ruby-identifier">formatters</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span>
14:           <span class="ruby-identifier">f</span>.<span class="ruby-identifier">add_example_group</span>(<span class="ruby-identifier">example_group</span>)
15:         <span class="ruby-keyword kw">end</span>
16:         <span class="ruby-identifier">example_groups</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">example_group</span>
17:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000569" class="method-detail">
        <a name="M000569"></a>

        <div class="method-heading">
          <a href="#M000569" class="method-signature">
          <span class="method-name">dump</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Dumps the summary and returns the total number of failures
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000569-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000569-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/reporter.rb, line 56</span>
56:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">dump</span>
57:         <span class="ruby-identifier">formatters</span>.<span class="ruby-identifier">each</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">f</span>.<span class="ruby-identifier">start_dump</span>}
58:         <span class="ruby-identifier">dump_pending</span>
59:         <span class="ruby-identifier">dump_failures</span>
60:         <span class="ruby-identifier">formatters</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span>
61:           <span class="ruby-identifier">f</span>.<span class="ruby-identifier">dump_summary</span>(<span class="ruby-identifier">duration</span>, <span class="ruby-ivar">@examples</span>.<span class="ruby-identifier">length</span>, <span class="ruby-ivar">@failures</span>.<span class="ruby-identifier">length</span>, <span class="ruby-ivar">@pending_count</span>)
62:           <span class="ruby-identifier">f</span>.<span class="ruby-identifier">close</span>
63:         <span class="ruby-keyword kw">end</span>
64:         <span class="ruby-ivar">@failures</span>.<span class="ruby-identifier">length</span>
65:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000568" class="method-detail">
        <a name="M000568"></a>

        <div class="method-heading">
          <a href="#M000568" class="method-signature">
          <span class="method-name">end</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000568-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000568-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/reporter.rb, line 51</span>
51:       <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">end</span>
52:         <span class="ruby-ivar">@end_time</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">new</span>
53:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000566" class="method-detail">
        <a name="M000566"></a>

        <div class="method-heading">
          <span class="method-name">example_failed</span><span class="method-args">(example, error)</span>
        </div>
      
        <div class="method-description">
          <p>
Alias for <a href="Reporter.html#M000565">failure</a>
</p>
        </div>
      </div>

      <div id="method-M000564" class="method-detail">
        <a name="M000564"></a>

        <div class="method-heading">
          <a href="#M000564" class="method-signature">
          <span class="method-name">example_finished</span><span class="method-args">(example, error=nil)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000564-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000564-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/reporter.rb, line 23</span>
23:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">example_finished</span>(<span class="ruby-identifier">example</span>, <span class="ruby-identifier">error</span>=<span class="ruby-keyword kw">nil</span>)
24:         <span class="ruby-ivar">@examples</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">example</span>
25:         
26:         <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">error</span>.<span class="ruby-identifier">nil?</span>
27:           <span class="ruby-identifier">example_passed</span>(<span class="ruby-identifier">example</span>)
28:         <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">Spec</span><span class="ruby-operator">::</span><span class="ruby-constant">Example</span><span class="ruby-operator">::</span><span class="ruby-constant">ExamplePendingError</span> <span class="ruby-operator">===</span> <span class="ruby-identifier">error</span>
29:           <span class="ruby-identifier">example_pending</span>(<span class="ruby-identifier">example</span>, <span class="ruby-identifier">error</span>.<span class="ruby-identifier">pending_caller</span>, <span class="ruby-identifier">error</span>.<span class="ruby-identifier">message</span>)
30:         <span class="ruby-keyword kw">else</span>
31:           <span class="ruby-identifier">example_failed</span>(<span class="ruby-identifier">example</span>, <span class="ruby-identifier">error</span>)
32:         <span class="ruby-keyword kw">end</span>
33:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000563" class="method-detail">
        <a name="M000563"></a>

        <div class="method-heading">
          <a href="#M000563" class="method-signature">
          <span class="method-name">example_started</span><span class="method-args">(example)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000563-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000563-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/reporter.rb, line 19</span>
19:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">example_started</span>(<span class="ruby-identifier">example</span>)
20:         <span class="ruby-identifier">formatters</span>.<span class="ruby-identifier">each</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">f</span>.<span class="ruby-identifier">example_started</span>(<span class="ruby-identifier">example</span>)}
21:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000565" class="method-detail">
        <a name="M000565"></a>

        <div class="method-heading">
          <a href="#M000565" class="method-signature">
          <span class="method-name">failure</span><span class="method-args">(example, error)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000565-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000565-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/reporter.rb, line 35</span>
35:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">failure</span>(<span class="ruby-identifier">example</span>, <span class="ruby-identifier">error</span>)
36:         <span class="ruby-identifier">backtrace_tweaker</span>.<span class="ruby-identifier">tweak_backtrace</span>(<span class="ruby-identifier">error</span>)
37:         <span class="ruby-identifier">failure</span> = <span class="ruby-constant">Failure</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">example</span>, <span class="ruby-identifier">error</span>)
38:         <span class="ruby-ivar">@failures</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">failure</span>
39:         <span class="ruby-identifier">formatters</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span>
40:           <span class="ruby-identifier">f</span>.<span class="ruby-identifier">example_failed</span>(<span class="ruby-identifier">example</span>, <span class="ruby-ivar">@failures</span>.<span class="ruby-identifier">length</span>, <span class="ruby-identifier">failure</span>)
41:         <span class="ruby-keyword kw">end</span>
42:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000567" class="method-detail">
        <a name="M000567"></a>

        <div class="method-heading">
          <a href="#M000567" class="method-signature">
          <span class="method-name">start</span><span class="method-args">(number_of_examples)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000567-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000567-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/reporter.rb, line 45</span>
45:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">start</span>(<span class="ruby-identifier">number_of_examples</span>)
46:         <span class="ruby-identifier">clear</span>
47:         <span class="ruby-ivar">@start_time</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">new</span>
48:         <span class="ruby-identifier">formatters</span>.<span class="ruby-identifier">each</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">f</span>.<span class="ruby-identifier">start</span>(<span class="ruby-identifier">number_of_examples</span>)}
49:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>